import threading
import time
from threading import Thread


def print_chars(char, n, interval=0.001):
    print(f'TID = {threading.get_native_id()}')
    for i in range(n):
        time.sleep(interval)
        print(f'{char}', end='', flush=True)


if __name__ == '__main__':

    # print_chars('1', 200)
    # print_chars('2', 200)

    th1 = Thread(target=print_chars, args=(1, 200), daemon=True)
    th2 = Thread(target=print_chars, args=(2, 200), daemon=True)
    th1.start()
    th2.start()

    th1.join()
    th2.join()
